#include<stdio.h>

int main()
{
	int i, n, N;
	int count = 0;
	int k = 0;
	scanf("%d", &N);

	for (i = 0; i < N;)//生成N * N 的点阵图案
	{
		scanf("%d", &n);
		for (int j = 0; j < n; j++)
		{
			printf("%d", k);
			count++;
			if (count % N == 0)//当一行有N个数字时
			{
				printf("\n");
				i++;//生成下一行
			}
		}
		k = 1 - k;//0和1交替
	}
	return 0; 
}